//
// CVegetableShapeBuild.java
// Copyright (C) 2010  "Naush" <naush _ hotmail _ fr>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>./* ----------------------------------------------------------------------------







package org.ryzom.nel.threed;

public class CVegetableShapeBuild {
  private long swigCPtr;
  protected boolean swigCMemOwn;

  public CVegetableShapeBuild(long cPtr, boolean cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = cPtr;
  }

  public static long getCPtr(CVegetableShapeBuild obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        nel3dJNI.delete_CVegetableShapeBuild(swigCPtr);
      }
      swigCPtr = 0;
    }
  }

  public void setVB(CVertexBuffer value) {
    nel3dJNI.CVegetableShapeBuild_VB_set(swigCPtr, this, CVertexBuffer.getCPtr(value), value);
  }

  public CVertexBuffer getVB() {
    long cPtr = nel3dJNI.CVegetableShapeBuild_VB_get(swigCPtr, this);
    return (cPtr == 0) ? null : new CVertexBuffer(cPtr, false);
  }

  public void setPB(CIndexBuffer value) {
    nel3dJNI.CVegetableShapeBuild_PB_set(swigCPtr, this, CIndexBuffer.getCPtr(value), value);
  }

  public CIndexBuffer getPB() {
    long cPtr = nel3dJNI.CVegetableShapeBuild_PB_get(swigCPtr, this);
    return (cPtr == 0) ? null : new CIndexBuffer(cPtr, false);
  }

  public void setLighted(boolean value) {
    nel3dJNI.CVegetableShapeBuild_Lighted_set(swigCPtr, this, value);
  }

  public boolean getLighted() {
    return nel3dJNI.CVegetableShapeBuild_Lighted_get(swigCPtr, this);
  }

  public void setPreComputeLighting(boolean value) {
    nel3dJNI.CVegetableShapeBuild_PreComputeLighting_set(swigCPtr, this, value);
  }

  public boolean getPreComputeLighting() {
    return nel3dJNI.CVegetableShapeBuild_PreComputeLighting_get(swigCPtr, this);
  }

  public void setDoubleSided(boolean value) {
    nel3dJNI.CVegetableShapeBuild_DoubleSided_set(swigCPtr, this, value);
  }

  public boolean getDoubleSided() {
    return nel3dJNI.CVegetableShapeBuild_DoubleSided_get(swigCPtr, this);
  }

  public void setAlphaBlend(boolean value) {
    nel3dJNI.CVegetableShapeBuild_AlphaBlend_set(swigCPtr, this, value);
  }

  public boolean getAlphaBlend() {
    return nel3dJNI.CVegetableShapeBuild_AlphaBlend_get(swigCPtr, this);
  }

  public void setBestSidedPreComputeLighting(boolean value) {
    nel3dJNI.CVegetableShapeBuild_BestSidedPreComputeLighting_set(swigCPtr, this, value);
  }

  public boolean getBestSidedPreComputeLighting() {
    return nel3dJNI.CVegetableShapeBuild_BestSidedPreComputeLighting_get(swigCPtr, this);
  }

  public void setMaxBendWeight(float value) {
    nel3dJNI.CVegetableShapeBuild_MaxBendWeight_set(swigCPtr, this, value);
  }

  public float getMaxBendWeight() {
    return nel3dJNI.CVegetableShapeBuild_MaxBendWeight_get(swigCPtr, this);
  }

  public void setBendCenterMode(CVegetableShapeBuild.TBendCenterMode value) {
    nel3dJNI.CVegetableShapeBuild_BendCenterMode_set(swigCPtr, this, value.swigValue());
  }

  public CVegetableShapeBuild.TBendCenterMode getBendCenterMode() {
    return CVegetableShapeBuild.TBendCenterMode.swigToEnum(nel3dJNI.CVegetableShapeBuild_BendCenterMode_get(swigCPtr, this));
  }

  public CVegetableShapeBuild() {
    this(nel3dJNI.new_CVegetableShapeBuild(), true);
  }

  public final static class TBendCenterMode {
    public final static TBendCenterMode BendCenterNull = new TBendCenterMode("BendCenterNull", nel3dJNI.CVegetableShapeBuild_BendCenterNull_get());
    public final static TBendCenterMode BendCenterZ = new TBendCenterMode("BendCenterZ");
    public final static TBendCenterMode BendCenterModeCount = new TBendCenterMode("BendCenterModeCount");

    public final int swigValue() {
      return swigValue;
    }

    public String toString() {
      return swigName;
    }

    public static TBendCenterMode swigToEnum(int swigValue) {
      if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
        return swigValues[swigValue];
      for (int i = 0; i < swigValues.length; i++)
        if (swigValues[i].swigValue == swigValue)
          return swigValues[i];
      throw new IllegalArgumentException("No enum " + TBendCenterMode.class + " with value " + swigValue);
    }

    private TBendCenterMode(String swigName) {
      this.swigName = swigName;
      this.swigValue = swigNext++;
    }

    private TBendCenterMode(String swigName, int swigValue) {
      this.swigName = swigName;
      this.swigValue = swigValue;
      swigNext = swigValue+1;
    }

    private TBendCenterMode(String swigName, TBendCenterMode swigEnum) {
      this.swigName = swigName;
      this.swigValue = swigEnum.swigValue;
      swigNext = this.swigValue+1;
    }

    private static TBendCenterMode[] swigValues = { BendCenterNull, BendCenterZ, BendCenterModeCount };
    private static int swigNext = 0;
    private final int swigValue;
    private final String swigName;
  }

}
